package com.jingwu.example.repository;

import cn.hutool.core.util.RandomUtil;
import com.jingwu.example.pojo.entity.FooDO;
import org.springframework.stereotype.Repository;

/**
 * @author 菁芜
 * @date 2021/1/3 -16:12
 */
@Repository
public class FooRepository {

    public FooDO get(String id) {
        // 应当从数据库查询
        return getFooDO(id);
    }

    private FooDO getFooDO(String id) {
        FooDO entity = new FooDO();
        entity.setId(id);
        entity.setName(RandomUtil.randomString(10));
        return entity;
    }


}
